package com.red.controller;

import com.red.result.Result;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {
    @RequestMapping("/test")
    @PreAuthorize("hasRole('reg')")
    public Result test(){
        return new Result();
    }

    @RequestMapping("/cg")
    @PreAuthorize("hasAuthority('cg')")
    public Result cg(){
        return new Result();
    }
}
